import Cookies from 'js-cookie'

// const TokenKey = 'vue_admin_template_token'
const TokenKey = 'token'

const NickNameKey = 'nick'

export function getToken() {
  return Cookies.get(TokenKey)
}

export function setToken(token) {
  return Cookies.set(TokenKey, token)
}

export function removeToken() {
  return Cookies.remove(TokenKey)
}

export function getNickName() {
  // console.log(' --auth.js/getNickName() --', nickName)
  return Cookies.get(NickNameKey)
}

export function setNickName(nickName) {
  console.log(' --auth.js/setNickName() --', nickName)
  return Cookies.set(NickNameKey, nickName)
}

export function removeNickName() {
  return Cookies.remove(NickNameKey)
}
